var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var ParentCls = /** @class */ (function () {
    function ParentCls(name) {
        this.name = name;
    }
    //
    ParentCls.prototype.ktv = function () {
        console.log(this.name + '唱歌');
    };
    return ParentCls;
}());
// 继承父类实现多接口
var SubCls = /** @class */ (function (_super) {
    __extends(SubCls, _super);
    function SubCls() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    // 实现接口
    SubCls.prototype.sports = function () {
        console.log(this.name + '运动');
    };
    SubCls.prototype.swimming = function () {
        console.log(this.name + '游泳');
    };
    return SubCls;
}(ParentCls));
var subCls = new SubCls('小明');
subCls.sports();
subCls.swimming();
subCls.ktv();
//
var SubCls2 = /** @class */ (function (_super) {
    __extends(SubCls2, _super);
    function SubCls2() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    //
    SubCls2.prototype.coding = function () {
        console.log(this.name + '写代码');
    };
    SubCls2.prototype.sports = function () {
        console.log(this.name + '运动');
    };
    SubCls2.prototype.swimming = function () {
        console.log(this.name + '游泳');
    };
    return SubCls2;
}(ParentCls));
var subCls2 = new SubCls2('小王');
subCls2.coding();
subCls2.sports();
subCls2.ktv();
subCls.swimming();
// 接口继承接口
// interface Three extends One,Two{
//     number(obj:NumObj):number
// }
var MyCls = /** @class */ (function () {
    function MyCls(name) {
        this.name = name;
    }
    MyCls.prototype.sports = function () {
        console.log(this.name + '运动');
    };
    return MyCls;
}());
var MySubCls = /** @class */ (function (_super) {
    __extends(MySubCls, _super);
    function MySubCls() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    MySubCls.prototype.singging = function () {
        console.log(this.name + '在唱歌');
    };
    MySubCls.prototype.swimming = function () {
        console.log(this.name + '在游泳');
    };
    return MySubCls;
}(MyCls));
var person = new MySubCls('张三');
person.singging();
person.swimming();
